

// Calculate the diffuse light component, add it to the ambient
// light component and return the colour value
float4 main(float3 Light: TEXCOORD0, float3 Norm : TEXCOORD1) : COLOR
{
    // Intensity of ambient light:
    float Aintensity=0.2f;

    // The colour of the ambient light:
    float4 Acolour=float4(0.1,0.1,0.1,1.0);

    // Define variable for the intensity and colour
    float Dintensity=1.0f;
    float4 Dcolour=float4(1.0,0.6,0.6,1.0);

    // Calculate the result using the light vector (Light)
    // and normal (Norm), using the dot product
    float4 result=Dintensity*Dcolour*(dot(Norm,Light));
    //float4 result = float4(Light, 1.0f);

    // Add the diffuse result to the ambient below for return
    return result;//Aintensity*Acolour+result;
}
